<?php echo $this->doctype('XHTML1_STRICT');?>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Revenue | Admin Panel</title>
    <?php echo $this->headLink()->appendStylesheet('/css/back-end/reset.css'); ?> 
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/text.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/grid.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/layout.css','all'); ?>
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/nav.css','all'); ?> 
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/themes/base/jquery.ui.all.css','all'); ?>     	
    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" /><![endif]-->
    <!-- BEGIN: load jquery -->
    <?php echo $this->headScript()->appendFile('/js/back-end/jquery-1.6.4.min.js');?>
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.widget.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.ui.accordion.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.core.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jquery-ui/jquery.effects.slide.min.js','text/javascript');?> 
    <!-- END: load jquery -->
    <!-- BEGIN: load jqplot -->
    <!--[if lt IE 9]><script language="javascript" type="text/javascript" src="/js/back-end/jqPlot/excanvas.min.js"></script><![endif]-->
    <?php echo $this->headLink()->offsetSetStylesheet(0,'/css/back-end/jquery.jqplot.min.css','all'); ?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/jquery.jqplot.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.canvasTextRenderer.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.canvasAxisLabelRenderer.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.barRenderer.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.pieRenderer.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.highlighter.min.js','text/javascript');?> 
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.pointLabels.min.js','text/javascript');?>
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.pointLabels.min.js','text/javascript');?>  
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.donutRenderer.min.js','text/javascript');?>
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/jqPlot/plugins/jqplot.bubbleRenderer.min.js','text/javascript');?>    
    <!-- END: load jqplot -->
    <?php echo $this->headScript()->offsetSetFile(0,'/js/back-end/setup.js','text/javascript');?>   
    <script type="text/javascript">
        $(document).ready(function () {           
            drawBarchart('bar-chart');            
            setupLeftMenu();
			setSidebarHeight();
        });
    </script>
</head>
<body>
    <div class="container_12">
        <div class="grid_12 header-repeat">
            <div id="branding">
                <div class="floatleft">
                    <img src="../../images/back-end/logo.png" alt="Logo" /></div>
                <div class="floatright">
                    <div class="floatleft">
                        <img src="../../images/back-end/img-profile.jpg" alt="Profile Pic" /></div>
                    <div class="floatleft marginleft10">
                        <ul class="inline-ul floatleft">
                            <li>Hello Admin</li>
                            <li><a href="#">Config</a></li>
                            <li><a href="#">Logout</a></li>
                        </ul>
                        <br />
                        <span class="small grey">Last Login: 3 hours ago</span>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="grid_12">
            <ul class="nav main">
                <li class="ic-dashboard"><a href="<?php echo $this->baseUrl();?>/admin/index"><span> Trang chủ </span></a> </li>
                <li class="ic-form-style"><a href="<?php echo $this->baseUrl();?>/admin/menu"><span> Món ăn </span></a> </li>				
                <li class="ic-charts"><a href="<?php echo $this->baseUrl();?>/admin/revenue"><span> Doanh thu </span></a></li>
                <li class="ic-grid-tables"><a href="<?php echo $this->baseUrl();?>/admin/customer"><span> Khách hàng </span></a></li>
                
        	</ul>
        </div>
        <div class="clear">
        </div>
        
        
        
        <div class="grid_10">
        	<div class="box round first">
        		 <h2> Doanh thu </h2>
                  <div id="bar-chart">
                    </div>
            <table border = "1" cellspacing = "0" cellpadding = "0">
            	<tr> 
	            	<th> Mã số </th>
	            	<th> Tên đăng nhập </th>
	            	<th> Mật khẩu </th>
	            	<th> Ngày đăng nhập </th>
	           </tr>
	          <?php 
	          		$users = $this->users;
	           		for($i = 0;$i < count($users);$i++)
	           		{
		           		echo "<tr>\n";
		           		echo "<td>" .$users[$i]['customer_id'] ."</td>\n";
		           		echo "<td>" .$users[$i]['customer_name'] ."</td>\n";
		           		echo "<td>" .$users[$i]['customer_password'] ."</td>\n";
		           		echo "</tr>\n";
	           		}
	           ?>
            </table>
            <table border = "1" cellspacing = "0" cellpadding = "0">
            	<tr>
            		<th> Mã hóa đơn </th>
            		<th> Mã khách hàng </th>
            		<th> Số lượng món ăn </th>
            		<th> Số lượng phụ gia </th>
            		<th> Thành tiền </th>
            	</tr>
            	<?php
            		$bills = $this->bills;
            		for($j = 0;$j < count($bills);$j++)
            		{
            			echo "<tr>\n";
            			echo "<td>" .$bills[$j]['bill_id'] ."</td>\n";
            			echo "<td>" .$bills[$j]['customer_id'] ."</td>\n";
            			echo "<td>" .$bills[$j]['item_quantity'] ."</td>\n";
            			echo "<td>" .$bills[$j]['spice_quantity'] ."</td>\n";
            			echo "<td>" .$bills[$j]['total_money'] ."</td>\n";
            		} 
            	?>
            	            	
            </table>     
            </div>            
        </div>     
        <div class="clear">
        </div>
    </div>
    <div class="clear">
    </div>
    
</body>
</html>
